package com.tem.system.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.tem.common.core.domain.SysRoleDataScope;
import com.tem.common.core.domain.SysSearchPage;
import com.tem.common.tool.domain.SecurityClaimsUserEntity;
import com.tem.common.tool.enums.AuthenticationIdentityEnum;
import com.tem.common.tool.result.ResultUtil;
import com.tem.system.entity.SysUserEntity;
import io.swagger.annotations.ApiOperation;

import java.util.List;

/**
 * @author 腾木科技 Created by 2022/1/7 17:22
 */
public interface SysUserService extends IService<SysUserEntity> {
    @ApiOperation(value = "登录获取资源")
    ResultUtil<SecurityClaimsUserEntity> oauthAuthenticationByAccount(String account, AuthenticationIdentityEnum authenticationIdentityEnum);

    ResultUtil<IPage<SysUserEntity>> pageSearch(SysSearchPage request);

    ResultUtil<SysUserEntity> saveOperator(SysUserEntity request);

    ResultUtil<SysUserEntity> deleteOperatorById(String id);

    ResultUtil<?> deleteBath(long[] ids);

    ResultUtil<?> updateEnabled(Long id, Boolean enabled);
    @ApiOperation(value = "根据企业获取所有权限")
    public List<SysRoleDataScope> getAllSysRoleDataScope(Long sysBranchOfficeId);
}
